#ifndef HEADGENPPCALLBACKS_H
#define HEADGENPPCALLBACKS_H

#include <clang/Lex/Preprocessor.h>

#include <string>
#include <map>

struct HeaderInfo {
	std::string m_nameAsWritten;
	bool m_isAngled;
	bool m_isUsed;
	std::string m_name;

	HeaderInfo(const std::string &name = "",
			   const std::string &nameAsWritten = "",
			   bool isAngled = true, bool isUsed = false) :
		m_name(name),
		m_nameAsWritten(nameAsWritten),
		m_isAngled(isAngled),
		m_isUsed(isUsed)
	{}
};

typedef std::map<std::string, HeaderInfo> HeaderInfoMap;


class HeadgenPPCallbacks : public clang::PPCallbacks
{
public:
	HeadgenPPCallbacks(HeaderInfoMap &headerInfoMap);

	virtual void InclusionDirective(clang::SourceLocation HashLoc, const clang::Token &IncludeTok,
			llvm::StringRef FileName, bool IsAngled, const clang::FileEntry *File,
			clang::SourceLocation EndLoc);

private:
	HeaderInfoMap &m_headerInfoMap;
};

#endif // HEADGENPPCALLBACKS_H
